<template>
  <div>
    <div style="width:100%;background-color: #FFFFFF;">
      <a-tabs :activeKey="defaultActiveKey" @change="callback" size="small">
        <a-tab-pane key="1" tab="平安关爱摸底" forceRender>
          <care rel="prefetch" ref="care"></care>
        </a-tab-pane>
        <a-tab-pane key="2" tab="主诉问题及评估服务" forceRender>
          <serve rel="prefetch" ref="serves"></serve>
        </a-tab-pane>
      </a-tabs>
    </div>
  </div>

</template>

<script>
import care from '@views/sjsk/holographicArchives/modules/estimate/care'
import serve from "@views/sjsk/holographicArchives/modules/estimate/serve";
export default {
  name: "index",
  components:{care,serve},
  data(){
    return {
      innse:true,
      defaultActiveKey:'1'
    }
  },
  mounted() {
    console.log(3)

  },
  methods:{
    refreshTable(){
      console.log('预估')
      this.callback('1')
      // this.callback('2')
    },
    callback(key) {
      console.log(key)
      switch(key){
        case '1':
          this.$refs.care.refreshTable()
          this.defaultActiveKey = '1'
          break
        case '2':
          this.$refs.serves.getDetail()
          this.defaultActiveKey = '2'
          break
      }
    },
  }
}
</script>

<style scoped>

</style>